<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

$config = [
    // +----------------------------------------------------------------------
    // | 应用设置
    // +----------------------------------------------------------------------
    // 应用命名空间
    'app_namespace'          => 'app',
    // 应用调试模式
    'app_debug' => 0,
    // 应用Trace
    'app_trace'              => false,
    // 应用模式状态
    'app_status'             => '',
    // 是否支持多模块
    'app_multi_module'       => true,
    // 入口自动绑定模块
    'auto_bind_module'       => false,
    // 注册的根命名空间
    'root_namespace'         => [],
    // 扩展函数文件
    'extra_file_list'        => [THINK_PATH . 'helper' . EXT],
    // 默认输出类型
    'default_return_type'    => 'json',
    // 默认AJAX 数据返回格式,可选json xml ...
    'default_ajax_return'    => 'json',
    // 默认JSONP格式返回的处理方法
    'default_jsonp_handler'  => 'jsonpReturn',
    // 默认JSONP处理方法
    'var_jsonp_handler'      => 'callback',
    // 默认时区
    'default_timezone'       => 'PRC',
    // 是否开启多语言
    'lang_switch_on'         => false,
    // 默认全局过滤方法 用逗号分隔多个
    'default_filter'         => 'strip_tags,htmlspecialchars',
    // 默认语言
    'default_lang'           => 'zh-cn',
    // 应用类库后缀
    'class_suffix'           => false,
    // 控制器类后缀
    'controller_suffix'      => false,
    // +----------------------------------------------------------------------
    // | 模块设置
    // +----------------------------------------------------------------------
    // 默认模块名
    'default_module'         => 'index',
    // 禁止访问模块
    'deny_module_list'       => ['common'],
    // 默认控制器名
    'default_controller'     => 'Index',
    // 默认操作名
    'default_action'         => 'index',
    // 默认验证器
    'default_validate'       => '',
    // 默认的空控制器名
    'empty_controller'       => 'Error',
    // 操作方法后缀
    'action_suffix'          => '',
    // 自动搜索控制器
    'controller_auto_search' => false,
    // +----------------------------------------------------------------------
    // | URL设置
    // +----------------------------------------------------------------------
    // PATHINFO变量名 用于兼容模式
    'var_pathinfo'           => 's',
    // 兼容PATH_INFO获取
    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
    // pathinfo分隔符
    'pathinfo_depr'          => '/',
    // URL伪静态后缀
    'url_html_suffix'        => 'html',
    // URL普通方式参数 用于自动生成
    'url_common_param'       => false,
    // URL参数方式 0 按名称成对解析 1 按顺序解析
    'url_param_type'         => 0,
    // 是否开启路由
    'url_route_on'           => true,
    // 路由使用完整匹配
    'route_complete_match'   => false,
    // 路由配置文件（支持配置多个）
    'route_config_file'      => ['route'],
    // 是否强制使用路由
    'url_route_must'         => false,
    // 域名部署
    'url_domain_deploy'      => false,
    // 域名根，如thinkphp.cn
    'url_domain_root'        => '',
    // 是否自动转换URL中的控制器和操作名
    'url_convert' => false,
    // 默认的访问控制器层
    'url_controller_layer'   => 'controller',
    // 表单请求类型伪装变量
    'var_method'             => '_method',
    // 表单ajax伪装变量
    'var_ajax'               => '_ajax',
    // 表单pjax伪装变量
    'var_pjax'               => '_pjax',
    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
    'request_cache'          => false,
    // 请求缓存有效期
    'request_cache_expire'   => null,
    // +----------------------------------------------------------------------
    // | 模板设置
    // +----------------------------------------------------------------------
    'template'               => [
        // 模板引擎类型 支持 php think 支持扩展
        'type'         => 'Think',
        // 模板路径
        'view_path'    => '',
        // 模板后缀
        'view_suffix'  => 'html',
        // 模板文件名分隔符
        'view_depr'    => DS,
        // 模板引擎普通标签开始标记
        'tpl_begin'    => '{',
        // 模板引擎普通标签结束标记
        'tpl_end'      => '}',
        // 标签库标签开始标记
        'taglib_begin' => '{',
        // 标签库标签结束标记
        'taglib_end'   => '}',
    ],
    // 视图输出字符串内容替换
    'view_replace_str'       => [],
    // 默认跳转页面对应的模板文件
    'dispatch_success_tmpl'  => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
    'dispatch_error_tmpl'    => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
    // +----------------------------------------------------------------------
    // | 异常及错误设置
    // +----------------------------------------------------------------------
    // 异常页面的模板文件
    'exception_tmpl'         => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',
    // 错误显示信息,非调试模式有效
    'error_message'          => '页面错误！请稍后再试～',
    // 显示错误信息
    'show_error_msg' => true,
    // 异常处理handle类 留空使用 \think\exception\Handle
    'exception_handle'       => '',
    // +----------------------------------------------------------------------
    // | 日志设置
    // +----------------------------------------------------------------------
    'log'                    => [
        // 日志记录方式，内置 file socket 支持扩展
        'type'  => 'File',
        // 日志保存目录
        'path'  => LOG_PATH,
        // 日志记录级别
        'level' => [],
    ],
    // +----------------------------------------------------------------------
    // | Trace设置 开启 app_trace 后 有效
    // +----------------------------------------------------------------------
    'trace'                  => [
        // 内置Html Console 支持扩展
        'type' => 'Html',
    ],
    // +----------------------------------------------------------------------
    // | 缓存设置
    // +----------------------------------------------------------------------
    'cache'                  => [
        // 驱动方式
        'type'     => 'redis',
        // 缓存保存目录
        //'path'   => CACHE_PATH,
        // 缓存前缀
        'prefix'   => '',
        // 缓存有效期 0表示永久缓存
        'expire'   => 0,
        'host'     => '192.168.1.189',
        'port'     => '6379',
        'password' => '',
        'select'   => '6',
    ],
    // +----------------------------------------------------------------------
    // | 会话设置
    // +----------------------------------------------------------------------
    'session'                => [
        'id'             => '',
        // SESSION_ID的提交变量,解决flash上传跨域
        'var_session_id' => '',
        // SESSION 前缀
        'prefix'         => 'jj_',
        // 驱动方式 支持redis memcache memcached
        'type'           => '',
        // 是否自动开启 SESSION
        'auto_start'     => true,
    ],
    // +----------------------------------------------------------------------
    // | Cookie设置
    // +----------------------------------------------------------------------
    'cookie'                 => [
        // cookie 名称前缀
        'prefix'    => '',
        // cookie 保存时间
        'expire'    => 0,
        // cookie 保存路径
        'path'      => '/',
        // cookie 有效域名
        'domain'    => '',
        //  cookie 启用安全传输
        'secure'    => false,
        // httponly设置
        'httponly'  => '',
        // 是否使用 setcookie
        'setcookie' => true,
    ],
    //分页配置
    'paginate'               => [
        'type'      => 'bootstrap',
        'var_page'  => 'page',
        'list_rows' => 15,
    ],
    //'arvatoURL' => 'http://139.196.29.117:8080/',
    'arvatoURL' => 'http://110.80.17.92:18001/',
    'arvatoPublicKey' => 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7AfKoztY+GEn2IO/5HuClL+qHmY2qz4PPr4p5FAzmvlQYyVbGdnfJaRyI2V0gPjQpgL11cmdfoM+qN7l7OCY//6nIX/okjfOx9Lyyn9+Tz0j/pWI6bsKVN3qvzCGR5RaVPgXxQsLhmfVAuq+4OahiizFrrARAWtjKYR5EqdIlaQIDAQAB',
    'arvatoPrivateKey' => 'MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALsB8qjO1j4YSfYg7/ke4KUv6oeZjarPg8+vinkUDOa+VBjJVsZ2d8lpHIjZXSA+NCmAvXVyZ1+gz6o3uXs4Jj//qchf+iSN87H0vLKf35PPSP+lYjpuwpU3eq/MIZHlFpU+BfFCwuGZ9UC6r7g5qGKLMWusBEBa2MphHkSp0iVpAgMBAAECgYBT2hm+i5ARI772N+qiX7AHIacdykJ1lrrZwzJp/A2U4T7AJndcYf5wN0tuKVjSflHRUkKhiPzFKkwzXO00TQcI4oVFIr9kK/d+g12hEWMN/KOQg7C7h/HTPPBvHeEtz7d4/Wy6W8doDz3K7F2nIt0Spn0txWDFh7tQx4mnAmREKQJBAOw06gN6eKJYEWDMJ/0QX0BdbwjrG8a7ts8syVkb6UWRvjL4+2aMTEiu9uJL6dqPXBVgB59TccffLg+sb9Oy6SsCQQDKrZ6BQdiHjI1M3m9cFlmV28lq4qDI6P64jwch8vdZ3e+5X3GqXgfsC/Q1Y+XIqdoEbceeYRZsW5PBgd+ahfm7AkEAhPjs3HRvwQTPE60ave4fkT6IKX8hreky6sKNvyplUhLP/iYIcRx+PVSyC4cs6StXbXkYEWuKXDiZ15z9fzHy7QJAG3cVoKx8nDnGuCD4dEEvGKi1Db/yS+ePBRGUxNv4+vuhTbyKWazuY+VmzYlhDSU/PxRlVagQctSiHDnuRDFdmwJAQwxyzqq2g/ZixMPPnlJOjIB89eoWFZW/eR6fUOfCs+yuK3gPpYzIYjcZFcL30m/w67nAuemWcxPrltB5MUiZJQ==',
    
    'arvatoAlarmEmail' => ['xiaoxiao.ding@joojtech.com','wenjing.lu@joojtech.com'],//arvato报警邮件地址
    
    'baiyangMallURL' => 'http://58.63.114.90:833/',
    //阿里云oss配置
    'ALIYUN_OSS_ENDPOINT'   => 'oss-cn-shenzhen.aliyuncs.com',
    'ALIYUN_OSS_ID'         => 'eSXhs5LyThGsicFZ',
    'ALIYUN_OSS_SECRET'     => 'aQ7LIGdGfmKpPg3sC6GlrH2d25FGoe',
    'ALIYUN_OSS_CNAME'      => 'http://image2.test.joojtech.com/',
    'ALIYUN_OSS_BUCKET'     => "jjbucket0001",
    
    'BAIYANG_API_APP_SECRET' => "3fy8un548fnsk843n39e32nu83kfyaaiy383jj48ejri",//白洋商城api appSecret

        
    //人脸识别阿里云OSS,测试版
    'ALIYUN_OSS_FACE_GRANT_BUCKET' => "joojtech-face-test",   
    'ALIYUN_OSS_FACE_CAMERA_BUCKET' => "joojtech-camera-test",
    
// 人脸ftp配置
    'FACE_FTP_PATH'  => '10.80.241.191/mnt/face/',
    
// 百度人脸摄像机抓拍图片存放的路径
    'BAIDU_FTP_CAMERA_PATH' => 'http://dev.face.joojtech.com',

// 人脸FTP连接配置
    'BAIDU_FTP_HOST' => '10.80.241.191',  //dev机器内网IP
    'BAIDU_FTP_PORT' => '21',
    'BAIDU_FTP_USER' => 'face',
    'BAIDU_FTP_PASS' => 'face@jooj',
    
    
//百度人脸识别接口的app_id , app_secret , app_secret_key 
    'BAIDU_FACE_APP_ID' => '10585652',
    'BAIDU_FACE_API_SECRET' => 'MZtIU03R7EsSzdOGAz92sPiP',
    'BAIDU_FACE_SECRET_KEY' => 'WxDy1iekcwAXpKYwbvvPAj4oRdgb3KiP',

//百人脸分组,授权分组和抓拍分组,测试版
    'BAIDU_FACE_GRANT_GROUP' => 'jj_grant_group_5',
    'BAIDU_FACE_CAMERA_GROUP' => 'jj_camera_group_5',
    'BAIDU_FACE_GRANT_USER_INFO' => '授权分组,测试版',
    'BAIDU_FACE_CAMERA_USER_INFO' => '抓拍分组,测试版',
    
];
$configEvn = [];

if (JOOJ_ENV == 'release') {
    $configEvn['app_debug'] = 0; //关闭调试
    
    $configEvn = [
        'cache' => [
            // 驱动方式
            'type'     => 'redis',
            // 缓存保存目录
            //'path'   => CACHE_PATH,
            // 缓存前缀
            'prefix'   => '',
            // 缓存有效期 0表示永久缓存
            'expire'   => 0,
            'host'     => '3182f60cbd2c416b.m.cnsza.kvstore.aliyuncs.com',
            'port'     => '6379',
            'password' => '3182f60cbd2c416b:joojJOOJ2016',
            'select'   => '6',
        ],
    ];

    $configEvn['JSM_API_CONFIG'] = [
        'domain' => 'http://jsm.joojtech.com',
        'app_id' => '349b23f2d71189f95a1b',
        'app_secrect' => 'd7e48de8afaec85d9c69a6d6f72166e9',
    ];
    
    $configEvn['OSS_DOMAIN'] = 'http://image2.joojtech.com/'; //微信引用的图片域名
    $configEvn["ALIYUN_OSS_BUCKET"] = "joojtech-report";
    
    $configEvn['baiyangMallURL'] = 'http://soa.baodao.com.cn:81/';

    $configEvn["BAIYANG_API_APP_SECRET"] = "f1df1ca9f5bbf9ef9085a646d382f36ef6a9e06d70b2";//白洋商城api appSecret
    
    $configEvn['arvatoURL'] = 'http://110.80.17.92:28001/'; //arvato正式环境配置
    
    //百度人脸识别:阿里云OSS正式版
    $configEvn['ALIYUN_OSS_FACE_GRANT_BUCKET'] = "joojtech-face";
    $configEvn['ALIYUN_OSS_FACE_CAMERA_BUCKET'] = "joojtech-camera";

}

if (JOOJ_ENV == 'autotest') {
    $configEvn = [
        'JSM_API_CONFIG' => [
            'domain'      => 'http://autotest.jsm.joojtech.com',
            'app_id'      => 'ibzN4rsTRXgedE3rVMeI',
            'app_secrect' => 'YQV3e6YuoRtCaYae0QazqfhrpdYRwfIk',
        ],
        'arvatoURL'      => 'http://arvato.api-mock.joojtech.com/',
        //soa2内网
        'SOA2_IN_URL'    => 'http://192.168.1.180:8008/Arvatoapi/action/appid/1/app_secret/1',
    ];
}

if (JOOJ_ENV == 'test') {

    $configEvn['JSM_API_CONFIG'] = [
        'domain'      => 'http://jsm.test.joojtech.com',
        'app_id'      => 'ibzN4rsTRXgedE3rVMeI',
        'app_secrect' => 'YQV3e6YuoRtCaYae0QazqfhrpdYRwfIk',
    ];

    //soa2内网
    $configEvn['SOA2_IN_URL'] = 'http://192.168.1.184:8008/Arvatoapi/action/appid/1/app_secret/1';

    //arvato接口配置


    $configEvn['baiyangMallURL'] = 'http://119.23.155.139:81/';
    
    //阿里云oss
    $configEvn['OSS_DOMAIN'] = 'http://image2.joojtech.com/'; //微信引用的图片域名
}

if (JOOJ_ENV == 'develop') {

    $configEvn['JSM_API_CONFIG'] = [
        'domain'      => 'http://jsm.dev.joojtech.com',
        'app_id'      => 'ibzN4rsTRXgedE3rVMeI',
        'app_secrect' => 'YQV3e6YuoRtCaYae0QazqfhrpdYRwfIk',
    ];

    //soa2内网
    $configEvn['SOA2_IN_URL'] = 'http://soa2.dev.joojtech.com/Arvatoapi/action/appid/1/app_secret/1';

    $configEvn['cache'] = [
        // 驱动方式
        'type'     => 'redis',
        // 缓存保存目录
        //'path'   => CACHE_PATH,
        // 缓存前缀
        'prefix'   => '',
        // 缓存有效期 0表示永久缓存
        'expire' => 0,
        'host' => '10.80.241.191',
        'port' => '6379',
        'password' => '',
        'select'   => '6',
    ];

    //arvato接口配置

    $configEvn['baiyangMallURL'] = 'http://119.23.155.139:81/';
    
    //阿里云oss设置
    $configEvn['OSS_DOMAIN'] = 'http://image2.test.joojtech.com/'; //微信引用的图片域名
    $configEvn["ALIYUN_OSS_BUCKET"] = "jjbucket0001";
    
     //人脸识别分组
    $configEvn['BAIDU_FACE_GRANT_GROUP'] = 'jj_grant_group_dev';
    $configEvn['BAIDU_FACE_CAMERA_GROUP'] = 'jj_camera_group_dev';
    
}

if (JOOJ_ENV == 'pre') {

    $configEvn['app_debug'] = 1;
            
    $configEvn['JSM_API_CONFIG'] = [
        'domain' => 'http://jsm.test.joojtech.com',
        'app_id' => 'ibzN4rsTRXgedE3rVMeI',
        'app_secrect' => 'YQV3e6YuoRtCaYae0QazqfhrpdYRwfIk',
    ];

    //soa2内网
    $configEvn['SOA2_IN_URL'] = 'http://soa2.joojtech.com/Arvatoapi/action/appid/1/app_secret/1';

    $configEvn['cache'] = [
        // 驱动方式
        'type' => 'redis',
        // 缓存保存目录
        //'path'   => CACHE_PATH,
        // 缓存前缀
        'prefix' => '',
        // 缓存有效期 0表示永久缓存
        'expire' => 0,
        'host' => '10.116.156.160',
        'port' => '6379',
        'password' => '',
        'select' => '6',
    ];

    //arvato接口配置
    
    $configEvn['baiyangMallURL'] = 'http://119.23.155.139:81/';
    
    //阿里云oss设置
    $configEvn['OSS_DOMAIN'] = 'http://image2.joojtech.com/'; //微信引用的图片域名
    
    // 人脸FTP连接配置
    $configEvn['FACE_FTP_HOST'] = '10.80.241.191';  //dev机器内网IP
    $configEvn['FACE_FTP_PORT'] = '21';
    $configEvn['FACE_FTP_USER'] = 'face';
    $configEvn['FACE_FTP_PASS'] = 'face@jooj';
            
    //百度人脸分组: 阿里云OSS测试版
    $configEvn['ALIYUN_OSS_FACE_GRANT_BUCKET'] = "joojtech-face-test"; 
    $configEvn['ALIYUN_OSS_FACE_CAMERA_BUCKET'] = "joojtech-camera-test"; 
    // 提示信息userInfo
    $configEvn['BAIDU_FACE_GRANT_USER_INFO'] = "授权分组,测试版"; 
    $configEvn['BAIDU_FACE_CAMERA_USER_INFO'] = "抓拍分组,测试版"; 
    
    //人脸识别分组
    $configEvn['BAIDU_FACE_GRANT_GROUP'] = 'jj_grant_group_pre';
    $configEvn['BAIDU_FACE_CAMERA_GROUP'] = 'jj_camera_group_pre';
    
}

return array_merge($config, $configEvn);
